package com.jiutong.meipenggang.http.model.requests;

import com.jiutong.meipenggang.http.RetrofitHandle;
import com.jiutong.meipenggang.http.SubscribeHandler;
import com.jiutong.meipenggang.http.model.services.MeiCaiBaoMainPageServer;
import com.jiutong.meipenggang.http.subscribers.ProgressSubscriber;

import java.util.HashMap;

import rx.Observable;

/**
 * Created by bdf on 2018/1/4.
 */
public class MeiCaiBaoRequest extends SubscribeHandler {
    /**
     * 美财宝首页
     *
     * @param progressSubscriber
     * @param fieldsMap
     */

    public void mcbMainPage(ProgressSubscriber progressSubscriber, HashMap<String, Object> fieldsMap) {
        handleFields(fieldsMap);
        Observable observable = RetrofitHandle.getInstance().retrofit.create(MeiCaiBaoMainPageServer.class)
                .MCBMainPage(fieldsMap);

        toSubscribe(observable, progressSubscriber);
    }

    public void payout1(ProgressSubscriber progressSubscriber, HashMap<String, Object> fieldsMap) {
        handleFields(fieldsMap);

        Observable observable = RetrofitHandle.getInstance().retrofit.create(MeiCaiBaoMainPageServer.class)
                .PayOut1(fieldsMap);

        toSubscribe(observable, progressSubscriber);
    }

    public void payout2(ProgressSubscriber progressSubscriber, HashMap<String, Object> fieldsMap) {
        handleFields(fieldsMap);

        Observable observable = RetrofitHandle.getInstance().retrofit.create(MeiCaiBaoMainPageServer.class)
                .PayOut2(fieldsMap);

        toSubscribe(observable, progressSubscriber);
    }

    public void surePayOut(ProgressSubscriber progressSubscriber, HashMap<String, Object> fieldsMap) {
        handleFields(fieldsMap);

        Observable observable = RetrofitHandle.getInstance().retrofit.create(MeiCaiBaoMainPageServer.class)
                .surePayOut(fieldsMap);

        toSubscribe(observable, progressSubscriber);
    }

    public void surePayOut2(ProgressSubscriber progressSubscriber, HashMap<String, Object> fieldsMap) {
        handleFields(fieldsMap);

        Observable observable = RetrofitHandle.getInstance().retrofit.create(MeiCaiBaoMainPageServer.class)
                .surePayOut2(fieldsMap);

        toSubscribe(observable, progressSubscriber);
    }

    public void payin(ProgressSubscriber progressSubscriber, HashMap<String, Object> fieldsMap) {
        handleFields(fieldsMap);

        Observable observable = RetrofitHandle.getInstance().retrofit.create(MeiCaiBaoMainPageServer.class)
                .Payin(fieldsMap);

        toSubscribe(observable, progressSubscriber);
    }

    public void surepayin(ProgressSubscriber progressSubscriber, HashMap<String, Object> fieldsMap) {
        handleFields(fieldsMap);

        Observable observable = RetrofitHandle.getInstance().retrofit.create(MeiCaiBaoMainPageServer.class)
                .SurePayin(fieldsMap);

        toSubscribe(observable, progressSubscriber);
    }
}
